export function generateOptionsArray(options:string) {
    const result: string[] = [];
    let current = '';
    let inQuotes = false;
    let quoteChar = '';

    for (const char of options) {
        if (char === '"' || char === "'") {
            if (inQuotes && char === quoteChar) {
                inQuotes = false;
            } else if (!inQuotes) {
                inQuotes = true;
                quoteChar = char;
            }
            continue;
        }
        if (char === ' ' && !inQuotes) {
            if (current) {
                result.push(current);
                current = '';
            }
            continue;
        }
        current += char;
    }
    if (current) result.push(current);
    return result;
}